import store from '@/store'

const modal = function (component, title, options) {
    var opts = {
        component,
        title
    }
    if (options) {
        Object.assign(opts, options)
    }
    store.commit('showDialog', opts)
}

modal.close = function () {
    store.commit('closeDialog')
}

export default modal